# Contributor: Leonardo Arena <rnalrd@alpinelinux.org>
# Maintainer: Justin Berthault <justin.berthault@zaclys.net>
pkgname=py3-django-cors-headers
pkgver=3.4.0
pkgrel=0
pkgdesc="Django app for handling the server headers required for Cross-Origin Resource Sharing (CORS)"
options="!check" # Requires running django instance
url="https://github.com/OttoYiu/django-cors-headers"
arch="noarch"
license="MIT"
depends="py3-django"
makedepends="py3-setuptools"
checkdepends="py3-tz py3-mock py3-pytest py3-coverage py3-pytest-cov"
source="https://files.pythonhosted.org/packages/source/d/django-cors-headers/django-cors-headers-$pkgver.tar.gz"
builddir="$srcdir"/django-cors-headers-$pkgver

build() {
	python3 setup.py --quiet build
}

check() {
	python3 runtests.py ./tests
}

package() {
	python3 setup.py --quiet install --prefix=/usr --root="$pkgdir"
}

sha512sums="0d234dee3c7146bf5d33c915b6bd9837de6ea292d2583c53a1e78c1bc95bf1d497f25254a48331342bfb7b3b3c86fb914c85b22763d80fb08e9f074878bd8e0c  django-cors-headers-3.4.0.tar.gz"
